﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LEET.LEETCommon.Model;
using LEET.CommonInterfaces.TestControls;
using System.Threading;
using Compiled_Tests;

namespace LEET.StandardModuals.Instructions
{
    public class Pause : Instruction
    {
        private String pause;

        public Pause(string[] args)
            : base(args)
        {
            pause = args[1].Trim();
        }

        public static IAutomationActionResult StaticCall(int pause)
        {
            Thread.Sleep(pause);
            return new AutomationActionResult();
        }

        public override String RenderStaticCall()
        {
            return "LEET.StandardModuals.Instructions.Pause.StaticCall("+pause+")";
        }

        public override string PlainText()
        {
            return "Wait for " + int.Parse(pause) + " milliseconds.";
        }
    }
}
